package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentSubject;
import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;
import com.tanhua.model.vo.PageResult;

import java.util.List;

/**
 * @author Xiao
 * @date 2021/10/28
 */
public interface CommentApi {
    /**
     * 圈子-评论列表
     * @param publishId
     * @param comment
     * @param page
     * @param pagesize
     * @return
     */
    List<Comment> selectByMovementId(String publishId, CommentType comment, Integer page, Integer pagesize);


    /**
     * 圈子-发布评论、点赞、熊欢
     * @param comment
     */
    Integer save(Comment comment, CommentSubject commentSubject);

    /**
     * 圈子-查看动态是否已点赞/已喜欢
     * @param userId
     * @param movementId
     * @param commentType
     * @return
     */
    Boolean hasComment(Long userId, String movementId, CommentType commentType);

    /**
     * 圈子-取消动态的喜欢、点赞
     * @param comment
     * @param commentSubject
     * @return
     */
    Integer delete(Comment comment, CommentSubject commentSubject);

    /**
     * 后台管理端查询评论分页列表
     * @param page
     * @param pagesize
     * @param messageID
     * @return
     */
    PageResult getComments(Integer page, Integer pagesize, String messageID);
}
